﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using Informant.Google.Contacts;
using Informant.Authentication;
using Informant.Services.Models.Contacts;
using Informant.Services.CommonFaults;

namespace Informant.Services.Contacts
{
	[ServiceContract(Namespace = "http://Informant.Services.Contacts/2010/04", SessionMode = SessionMode.Required, CallbackContract = typeof(IContactServiceCallback))]
	public interface IContactService
	{
		/// <summary>
		/// Logs the user on to the contact service.
		/// </summary>
		/// <param name="username">The username.</param>
		/// <param name="password">The password.</param>
		[OperationContract(Name = "LogOn")]
		[FaultContract(typeof(AuthorizationFault))]
		void LogOnContactService(String username, String password);
		/// <summary>
		/// Logs the user off the contact service.
		/// </summary>
		[OperationContract(Name = "LogOff", IsInitiating = false, IsTerminating = true)]
		[FaultContract(typeof(AuthorizationFault))]
		void LogOffContactService();
		/// <summary>
		/// Retrieves all contacts.
		/// </summary>
		/// <returns></returns>
		[OperationContract(IsInitiating = false)]
		[FaultContract(typeof(AuthorizationFault))]
		void RetrieveAllContacts();
		/// <summary>
		/// Retrieves all groups.
		/// </summary>
		[OperationContract(IsInitiating = false)]
		[FaultContract(typeof(AuthorizationFault))]
		void RetrieveAllGroups();
	}
}
